﻿using System.Configuration.Provider;
using NCMIS.ObjectModel;
using NCMIS.ObjectModel.MetaData;

namespace NCMIS.Provider
{
    /// <summary>
    /// Provides the base implementation for the Relationships Provider for the Relationships Services.
    /// </summary>
    public abstract class RelationshipProviderBase : ProviderBase
    {
        /// <summary>
        /// When implemented in a derived class, gets all or a subset of relationships associated with an independent object.
        /// </summary>
        /// <param name="repositoryId">The id of the repository.</param>
        /// <param name="objectId">The id of the object.</param>
        /// <param name="includeSubRelationshipTypes">If true, then the Repository must return all relationships whose Object-Types are descendant-types
        /// of the given object's cmis:objectTypeId property value.  If FALSE, then the Repository MUST only return relationships whose Object-Type is
        /// equivalent to the given object’s cmis:objectTypeId property value.</param>
        /// <param name="relationshipDirection">Specifies whether the Repository MUST return relationships where the specified Object is the source of
        /// the relationship, the target of the relationship, or both.</param>
        /// <param name="typeId"> If specified, then the Repository must return only relationships whose Object-Type is of the type specified.</param>
        /// <param name="filter">Value indicating which properties for Objects that must be returned.</param>
        /// <param name="includeAllowableActions">If true, then the the available actions for each object in the result set must be returned. (Optional, default: false)</param>
        /// <param name="maxItems">The maximum number of items to return in the response. (optional, default: repository specific)</param>
        /// <param name="skipCount">The number of potential results to skip before returning any results. (optional, default: 0)</param>
        /// <returns>Relationships associated with an independent object.</returns>
        public abstract CmisObjectList GetObjectRelationships(string repositoryId, string objectId, bool includeSubRelationshipTypes, RelationshipDirection relationshipDirection, string typeId, string filter, bool includeAllowableActions, int? maxItems, int skipCount);
    }
}
